<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title></title>
  <link rel="stylesheet" href="../lib/layui/css/layui.css">
  <link rel="stylesheet" href="../styles/css/index.css">
  <script src="../lib/layui/layui.js"></script>
  <style>
    .txt {
      color: red;
    }

    .btn {
      margin-left: 40px;
    }
    .bewinput .layui-input {
      display: inline-block;
      width: 100px;
    }
    .layui-form-label {
      float: left;
      display: block;
      padding: 9px 3px;
      width: 104px;
      font-weight: 400;
      line-height: 20px;
      text-align: right;
    }
  </style>
</head>

<body>
<div class="headTitle">
  知识库添加
</div>
  <div class="content">
    <div class="w-title"><span class="w-blueline"></span></div>
    <form class="layui-form" action="">
      <div class="layui-row">
          <div class="layui-col-md4">
            <div class="layui-form-item">
              <label class="layui-form-label"><i class="txt">*</i>标题:</label>
              <div class="layui-input-block">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入标题" autocomplete="off"
                  class="layui-input">
              </div>
            </div>
          </div>
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <label class="layui-form-label"><i class="txt">*</i>日期:</label>
            <div class="layui-input-block">
              <input name="time" type="text" class="layui-input" id="test1" required lay-verify="required">
            </div>
          </div>
        </div>
        </div>
      <div class="layui-row">
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <label class="layui-form-label"><i class="txt">*</i>农艺措施:</label>
            <div class="layui-input-block">
              <input type="text" name="title" required lay-verify="required" placeholder="请输入农艺措施" autocomplete="off"
                     class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <label class="layui-form-label"><i class="txt">*</i>农时:</label>
            <div class="layui-input-block bewinput">
              <input type="text" class="layui-input" id="test4" placeholder="请选择">
              至
              <input type="text" class="layui-input" id="test5" placeholder="请选择">
            </div>
          </div>
        </div>
        <div class="layui-col-md1">&nbsp;</div>
        <div class="layui-col-md3">

          <!-- <a href="###" class="layui-btn">导入</a> -->
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <label class="layui-form-label"><i class="txt">*</i>叶长:</label>
            <div class="layui-input-block bewinput">
              <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input"> 至
              <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <div class="layui-form-item">
              <label class="layui-form-label"><i class="txt">*</i>分蘖数:</label>
              <div class="layui-input-block bewinput">
                <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input"> 至
                <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
              </div>
            </div>
          </div>
        </div>
        <div class="layui-col-md1">&nbsp;</div>
        <div class="layui-col-md3">
        </div>
      </div>
      <div class="layui-row bewinput" >
        <div class="layui-col-md4">
          <label class="layui-form-label"><i class="txt">*</i>叶龄:</label>
          <div class="layui-input-block">
            <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input"> 至
            <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-col-md4">
          <label class="layui-form-label"><i class="txt">*</i>叶色(饱和度):</label>
          <div class="layui-input-block">
            <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input"> 至
            <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-col-md4">
        </div>
      </div>
      <div class="layui-row bewinput" >
        <div class="layui-col-md4">
          <label class="layui-form-label"><i class="txt">*</i>有效光合面积:</label>
          <div class="layui-input-block">
            <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input"> 至
            <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
          </div>
        </div>
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <label class="layui-form-label"><i class="txt">*</i>叶色(色度):</label>
            <div class="layui-input-block">
              <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input"> 至
              <input type="text" name="" placeholder="请输入" autocomplete="off" class="layui-input">
            </div>
          </div>
        </div>
        <div class="layui-col-md4">
        </div>
      </div>
      <div class="layui-row">
        <div class="layui-row">
          <div class="layui-col-md4">
            <div class="layui-form-item">
              <label class="layui-form-label"><i class="txt">*</i>所属类型:</label>
              <div class="layui-input-block">
                <select name="city" lay-verify="required">
                  <option value="">大棚</option>
                  <option value="1">农场B</option>
                </select>
              </div>
            </div>
          </div>
          <div class="layui-col-md4">
            <div class="layui-form-item">
              <label class="layui-form-label"><i class="txt">*</i>作者:</label>
              <div class="layui-input-block">
                <input type="text" name="title" required lay-verify="required" placeholder="请输入作者" autocomplete="off"
                  class="layui-input">
              </div>
            </div>
          </div>
          <div class="layui-col-md4">

          </div>
        </div>
      </div>

      <div class="layui-row">
        <div class="layui-col-md4">
          <span>&nbsp;</span>
        </div>
        <div class="layui-col-md4">
          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="formDemo">保存</button>
              <button type="reset" class="layui-btn layui-btn-primary">取消</button>
            </div>
          </div>
        </div>
        <div class="layui-col-md4">
          <span>&nbsp;</span>
        </div>
      </div>
    </form>
  </div>
</body>

</html>
<script>
  layui.use('form', function () {
    var form = layui.form;
    //监听提交
    form.on('submit(formDemo)', function (data) { //提交事件回调
      layer.msg(JSON.stringify(data.field));
      return false;
    });
  });
  layui.use('laydate', function () {
    var laydate = layui.laydate;

    //执行一个laydate实例
    laydate.render({
      elem: '#test1' //指定元素
    });
  });
</script>